do not assume python points to python3.
authorJordi Mallach <jordi@debian.org>
Thu, 12 Feb 2026 22:29:36 +0000 (23:29 +0100)
committerJordi Mallach <jordi@debian.org>
Thu, 12 Feb 2026 22:29:36 +0000 (23:29 +0100)
Origin: Debian
Forwarded: no

Gbp-Pq: Name python3.patch

makefile

index 8ac5c0bad38d47eb50f98cd0d5b29471b62d0c6c..90a2c1e1b5dd9e785a370c17a021eb5422fe3428 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1015,7 +1015,7 @@ GIT_AVAILABLE    := $(shell git --version > /dev/null 2>&1 && echo git)
 else
 GCC_VERSION      := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpfullversion 2> NUL)
 CLANG_VERSION    := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$$/\1/" | head -n 1)
-PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python)
+PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python3)
 GIT_AVAILABLE    := $(shell git --version > NUL 2>&1 && echo git)
 endif
 ifdef MSBUILD
@@ -1045,7 +1045,7 @@ CLANG_VERSION    := $(shell $(TOOLCHAIN)$(subst @,,$(CC))  -v  2>&1 >/dev/null |
 else
 CLANG_VERSION    := $(shell $(TOOLCHAIN)$(subst @,,$(CC))  --version  2> /dev/null | head -n 1 | grep -e 'version [0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | grep -e '[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' -o | tail -n 1)
 endif
-PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
+PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python3)
 GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git)
 endif
 
@@ -1064,7 +1064,7 @@ endif
 endif # asmjs
 endif # CLANG_VERSION
 
-ifneq ($(PYTHON_AVAILABLE),python)
+ifneq ($(PYTHON_AVAILABLE),python3)
 $(error Python is not available in path)
 endif